﻿package mortal.game.view.task.view
{
    import com.gengine.resource.*;
    import com.mui.controls.*;
    import com.mui.utils.*;
    import extend.language.*;
    import mortal.common.*;
    import mortal.common.global.*;
    import mortal.component.gLinkText.*;
    import mortal.game.view.common.*;

    public class TaskGuideArrow extends GSprite
    {
        private var _bg:GImageBitmap;
        private var _txt:GTextFiled;
        private var _flyBoot:FlyBoot;

        public function TaskGuideArrow()
        {
            return;
        }// end function

        public function updateDatas(param1:GLinkTextData, param2:Boolean, param3:Boolean = false) : void
        {
            var _loc_4:String = null;
            if (param3)
            {
                this._txt.htmlText = Language.getString(21188);
                if (this._flyBoot != null)
                {
                    this._flyBoot.dispose(true);
                    this._flyBoot = null;
                }
            }
            else if (param2)
            {
                if (this._flyBoot == null)
                {
                    this._flyBoot = UICompomentPool.getUICompoment(FlyBoot) as FlyBoot;
                }
                this.addChild(this._flyBoot);
                this._flyBoot.mouseChildren = false;
                this._flyBoot.mouseEnabled = false;
                this._flyBoot.x = -163;
                this._flyBoot.y = this._txt.y - 2;
                this._txt.htmlText = Language.getString(21189);
            }
            else
            {
                if (this._flyBoot != null)
                {
                    this._flyBoot.dispose(true);
                    this._flyBoot = null;
                }
                this._txt.y = 48;
                _loc_4 = "";
                if (param1.linkName != null)
                {
                    _loc_4 = param1.linkName;
                }
                this._txt.htmlText = Language.getStringByParam(21190, _loc_4);
            }
            if (this._txt.numLines >= 2)
            {
                this._txt.y = 40;
                if (this._flyBoot != null)
                {
                    this._flyBoot.y = this._txt.y - 2;
                }
            }
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._bg = UIFactory.gImageBitmap("", -200, 0, this);
            LoaderHelp.setBitmapdata("guideTaskArrow.png", this._bg);
            var _loc_1:* = GlobalStyle.textFormatLv;
            _loc_1.leading = 1;
            _loc_1.color = 16750848;
            this._txt = UIFactory.gTextField("", -190, 55, 160, 42, this, _loc_1);
            this._txt.multiline = true;
            this._txt.wordWrap = true;
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._bg.dispose(param1);
            this._bg = null;
            this._txt.dispose(param1);
            this._txt = null;
            if (this._flyBoot != null)
            {
                this._flyBoot.dispose(param1);
                this._flyBoot = null;
            }
            return;
        }// end function

    }
}
